package com.health.trans.common.entity;

/**
 * @Author: zlt
 */
public enum CodeEnum {
    SUCCESS(200,"成功"),
    ERROR(500,"未知异常"),
    SYSTEM_ERROR(50001,"业务内部异常"),
    TOKEN_IS_NULL(51000,"TOKEN为空"),
    TOKEN_ERROR(51001,"TOKEN错误"),
    TOKEN_TIME_OUT(51002,"TOKEN超时"),
    TOKEN_NOT_EXIST(51003,"TOKEN不存在"),
    ACCOUNT_NOT_EXIST(52000,"账号不存在"),
    PASSWORD_ERROR(52001,"密钥错误"),
    ACCOUNT_OR_PASSWORD_ERROR(52002,"账号或密钥错误"),
    GET_TOKEN_ERROR(52002,"获取TOKEN失败"),
    API_UNAUTHORIZD(52003,"接口权限不足!"),
    DATA_ERROR(53000,"数据错误"),
    DATA_DECRYPT_ERROR(53001,"数据解密错误"),
    DATA_VERIFY_ERROR(53002,"数据校验错误"),
    DATA_RELATED_ERROR(53003,"数据关联错误"),
    DATA_TRANSFORM_ERROR(53004,"数据转换错误"),
    DATA_ID_CARD_ERROR(53005,"身份证号错误"),
    DATA_SAVE_ERROR(53005,"数据存储错误"),
    DATA_QUERY_ERROR(53100,"数据查询错误"),
    DATA_ENCRYPT_ERROR(53101,"数据加密错误"),

    ORIGINAL_PASSWORD_CANNOT_BE_EMPTY(54001,"原密码不能为空"),
    THE_NEW_PASSWORD_IS_INCONSISTENT(54002,"两次输入的新密码不一致"),
    ORIGINAL_PASSWORD_ERROR(54003,"原密码错误"),
    EQUAL_TO_THE_ORIGINAL_PASSWORD(54004,"新密码与旧密码一致"),
    VERIFICATION_CDOE_CNANOT_BE_EMPTY(54005,"验证码不能为空"),
    VERIFICATION_CODE_VERIFICATION_EXCEPTION(54006,"验证码校验异常，请联系管理员"),
    USER_DOES_NOT_EXIST(54007,"用户不存在"),
    ACCOUNT_NOT_ALLOWED_TO_LOGIN(54008,"该账号不允许登录，请联系管理员！"),
    OPERATION_NOT_ALLOWED(54010,"该用户为系统保留用户，不允许操作！"),
    WRONG_PHONE_NUMBER(54100,"手机号错误"),
    ACCOUNT_ERROR(54200,"账号错误"),
    NOT_SET(54300,"未设置"),
    ID_CARD_REGISTERED(54401,"身份证号已被注册"),
    INVALID_ID_CARD(54402,"无效身份证号"),
    INVALID_MOBLIE(54403,"无效手机号"),
    PASSWORD_SETTING_ERROR(54500,"密码设置错误"),
    LOGIN_HAS_FAILED(54601,"注册失败！"),
    NO_PERMISSION(54700,"没有权限"),




    INFORMATION_DOES_NOT_EXIST(55001,"数据信息不存在!"),
    PARAMETER_CANNOT_BE_EMPTY(55002,"参数不能为空"),
    DATA_SAVING_ERROR(55003,"数据保存错误"),
    NO_PARENT_NODE_SELECTED(55004,"未选择父节点"),
    PATH_DECRYPTION_ERROR(55005,"路径解密错误"),
    ACCESS_PATH_CONNOT_BE_EMPTY(55006,"访问路径不能为空"),
    DELETION_NOT_ALLOWED(55007,"存在下级节点，不允许删除！"),
    PARAMETER_ALREADY_EXISTS(55100,"参数已存在"),
    INTERFACENAME_ALREADY_EXISTS(55101,"该接口名已存在"),



    CLEAR_ALL_CACHES(56001,"清除所有缓存"),
    CLEAR_GROUP_USER_ROLES(56002,"清除群组用户角色"),
    CLEAR_ROLE_RESOURCE_CHCHE(56003,"清除角色资源缓存"),
    CLEAR_DICTIONARY_CHCHE(56004,"清除字典缓存"),
    CLEARS_THE_SPECIFIED_DICTIONARY_CACHE(56005,"清除指定字典缓存"),
    CLEAR_USER_RIGHTS_CACHE(56006,"清除用户权限缓存"),
    FAILED_TO_REFRESH_CACHE(56007,"刷新缓存失败"),
    CLEAR_CHANNEL_TOKEN(56007,"清空变更签名前的token"),

    ERROR_GENERATING_SM2_KEY(56101,"生成SM2 Key错误"),
    THE_ENCRYPTION_TYPE_IS_NOT_SUPPORTED(56102,"不支持该加密类型"),




    ;




    private Integer code;
    private String msg;

    CodeEnum(Integer code, String msg){
        this.code = code;
        this.msg=msg;
    }

    public Integer getCode() {
        return code;
    }

    public String msg() {
        return msg;
    }
}
